package org.vincen.helloworld.socket;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerDemo3 {

	private Socket socket;
	private ServerSocket ss;

	public ServerDemo3() throws IOException {
		ss = new ServerSocket(8021);
		while (true) {
			socket = ss.accept();
			BufferedReader br = new BufferedReader(new InputStreamReader(
					socket.getInputStream()));
			System.out.println("you input is : " + br.readLine());
		}
	}

	public static void main(String[] args) {
		try {
			new ServerDemo3();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
